package proj3;

public class SensorNeuron extends Neuron {
	private Input[] _inputs;
	
	SensorNeuron(Input[] inputs) {
		super(null, null, null);
		
		_inputs = inputs;
	}
	
	@Override
	public double getO() {
		return getSumOfInputs();
	}

	public double getSumOfInputs() {
		if (_inputs == null)
			return 0.0;
		double val = 0;
		for (Input i: _inputs) 
			if (i.get())
				val ++;
		return val;
	}
	@Override
	public void reset() {
		return;
	}

}
